﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ASKM.Rachao.Model.Dto;

namespace ASKM.Rachao.Model.Assembler
{
    /// <summary>
    /// Static class for profile assemblers
    /// </summary>
    public static class ProfileAssembler
    {

        /// <summary>
        /// Converts from InitialRegisterDto to PlayerProfile
        /// </summary>
        /// <param name="dto">InitialRegisterDto</param>
        /// <returns>PlayerProfile</returns>
        public static PlayerProfile ConvertInitialRegisterDtoToPlayerProfile(InitialRegisterDto dto)
        {
            PlayerProfile pp = new PlayerProfile();
            pp.Name = dto.Name;
            pp.Lastname = dto.Lastname;
            pp.Email = dto.Email;
            return pp;
        }

        /// <summary>
        /// Converts from InitialRegisterDto to UserAccessProfile
        /// </summary>
        /// <param name="dto">InitialRegisterDto</param>
        /// <returns>UserAccessProfile</returns>
        public static UserAccessProfile ConvertInitialRegisterDtoToUserAccessProfile(InitialRegisterDto dto)
        {
            UserAccessProfile uap = new UserAccessProfile();
            uap.Password = dto.Password;            
            uap.Username = dto.Email;
            return uap;
        }

    }
}
